📐 added: OrthogonalCollocation with gaussradau and gausslegendre schemes#322
📐 added: OrthogonalCollocation with gaussradau and gausslegendre schemes#322franckgaga merged 50 commits intomainfrom
OrthogonalCollocation with gaussradau and gausslegendre schemes#322Conversation
`nc` was the number of collocation points. I renamed it to `np` since there is confusion with `mpc.con.nc`, the number of custom inequality constraints
The subscript p is already used for `Hp` i.e. "prediction".
A dispatch was not necessary for this.
It's not necessary to differentiate with a `k` vector that would include the operating point (there is never operating point in this vector). And it now follows the nomenclature of `OrthogonalCollocation`
The mutated argument is used to store the result of `model.f!` function, thus it is a derivative of the state. The distinction is more important for code readability of `CollocationMethods`.
The default of 3 collocation points (the internal points, thus it exclude the τ=0 point) is the most common default (e.g. do-mpc, CasADi, etc.)
`o` is misleading with the `λ_o` variable
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #322 +/- ##
==========================================
+ Coverage 98.42% 98.49% +0.06%
==========================================
Files 29 29
Lines 5397 5510 +113
==========================================
+ Hits 5312 5427 +115
+ Misses 85 83 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hello @baggepinnen, I still need to implement the tests, but do you have any comments on my points above and the documentation of the new Thanks for your time! |
|
I no longer have the numerics details in my head, but something I do know tend to be important is numerical scaling by the "typical magnitude" of the variables. A nice benefit of these methods is that they can be made to work for DAEs relatively easily |
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
The option was ignore since `hessian=true` meants sparse `AutoForwardDiff`, meaning that it was bypassing the other backends for efficiency (a `@warn` was printed to mention this)
Yes, right. For now I do not support any scaling factors at all throughout the package. My experience is that most of the time it's possible to "re-scale" the states/outputs/inputs/etc. manually by modifying the |
The transcription method is efficient for highly stiff nonlinear systems. The default
gaussradauquadrature is slightly less accurate thangausslegendre, but its an L-stable method, while the latter being A-stable.Some comments:
SimpleColloc.jl).OrthogonalCollocation, the associatedcon_nonlinprogeq!method andinit_orthocolloc.SimpleColloc), since it's simpler and I'm not convince that it's necessary.Closes #238